<%@ page import="com.odbpc.system.SysPara,
                 java.util.Vector"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
    //获取单位的strId
    String  strType=ParamUtil.getString(request,"strType","");
    //初始化
    SysPara  para0=null;
    SysPara obj=new SysPara(globa);
%>
<%
    //查询条件
    String tWhere=" WHERE 1=1";
    if(!strType.equals(""))
        tWhere+=" AND strType='"+strType+"'";
    String keyName=ParamUtil.getString(request,"keyName","");
    String keyValue=ParamUtil.getString(request,"keyValue","");
    if(!keyName.equals("")&&!keyValue.equals("")){
                 tWhere+="  AND  "+keyName+" LIKE '%"+keyValue+"%'";
      }
   tWhere+="  ORDER BY strType ASC,intSort ASC ";
%>
<%
       //记录总数
      int intAllCount=obj.getCount(tWhere);
      //当前页
      int  intCurPage=globa.getIntCurPage();
      //每页记录数
       int intPageSize=globa.getIntPageSize();
      //共有页数
       int intPageCount=(intAllCount-1)/intPageSize+1;
        // 循环显示一页内的记录 开始序号
      int intStartNum=(intCurPage-1)*intPageSize+1;
     //获取到当前页面的记录集
       Vector vctObj=obj.list(tWhere,intStartNum,intPageSize);
      //获取当前页的记录条数
      int intVct=(vctObj!=null&&vctObj.size()>0?vctObj.size():0);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=globa.APP_TITLE%></title>
<link rel="stylesheet" rev="stylesheet" href="../css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="../css/css1.css">
<link rel="stylesheet" href="../css/css.css">
<script src="../include/js/list.js"></script>
<script language="javascript">
  function chgType(inputVlaue){
          location.href='sysParaList.jsp?strType='+inputVlaue;
    }
</script>
</head>

<body >
<form name=frm method=post action="sysParaList.jsp">
<input type="hidden" name="<%=Constants.ACTION_TYPE%>" value="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="10"></td>
    </tr>
  <tr>
    <td>
    <table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="283">
          <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
             <tr>
              <td width="70" height="20"   align="center" nowrap align="right" class="tdblue2">模糊查询：</td>
              <td   align="left" >
                 
                       <select name="keyName" class="forms_color1">
                            <option value="strName" <%if(keyName.equals("strName")) out.print("selected");%>>参数名称</option>
                            <option value="strValue" <%if(keyName.equals("strValue")) out.print("selected");%>>参数值</option>
                            <option value="intSort" <%if(keyName.equals("intSort")) out.print("selected");%>>序号</option>
                            <option value="strState" <%if(keyName.equals("strState")) out.print("selected");%>>状态</option>
                      </select>
                          <input type="text" name="keyValue" size="10" class="forms_color1" value="<%=keyValue%>">&nbsp;
                          <input type="button" class=right-button02   value="查询" onClick="frmSearch('frm','sysParaList.jsp')" >
                </td>
               
               <td width="30%" align="right" >
               <input type="button" class="right-button02"  value="增加"  onClick="location.href='sysParaAdd.jsp?strType=<%=strType%>'">
               <input type="button" class="right-button02"  value="修改" onClick="update('frm','frm.strId','sysParaModi.jsp')">
               <input type="button" class="right-button02"  value="删除" onClick="delOne('frm','frm.strId','sysParaAct.jsp?<%=Constants.ACTION_TYPE%>=<%=Constants.DELETE_STR%>')">
                </td>
              </tr>
              <tr><td height="2" colspan="3"></td></tr>
              <tr>
                <td height="210" colspan="3" class="font42">
                <table width="100%" border="0" cellpadding="2" cellspacing="1" class="CContent" >
                  <tr class="CTitle" height="20">
                    <td align="center">
                      <div align="left"><strong> 数据字典列表 </strong></div></td>
                  </tr>
                  <tr  height="20">
                  <td   height="300" valign="top">
                  <!-- 记录开始 -->  
                   <table width="100%" border="0" cellpadding="2" cellspacing="1" >
                      <tr align="center" class="TablePanel" >
                        <td height="25" width="5%" nowrap><b><font color="#FF0000">选择</font></b></td>
                        
		                <td width="10%"><b>参数名称</b></td>
		                <td width="10%" ><b>参数值</b></td>
		                
		                <td width="50%"><b>参数注释</b></td>
                      </tr>
                      <%
                        for(int i=0;i<intVct;i++){
                          para0=(SysPara)vctObj.get(i);
                      %>
                      <tr class="<%=(i% 2 == 0 ? "tr1":"tr2")%>" onMouseOver='this.className="tr3"' onMouseOut='this.className="<%=(i%2==0?"tr1":"tr2")%>"'>
                        <td width="5%" align="center" height="24">
                           <input type="checkbox" name="strId" value="<%=para0.getStrId()%>" class="forms_color1">
                        </td>
                        
		                <td   align="left" ><a href="sysParaModi.jsp?strId=<%=para0.getStrId()%>"><%=para0.getStrName()%></a></td>
		                <td   align="left"><%=para0.getStrValue()%></td>
		               
		                <td   align="center" ><%=para0.getStrState()%></td>
                      </tr>
                      <%}%>                    
                  </table>
                   <!-- 记录结束 -->  
                  </td></tr>
                </table>
                </td>
        </tr>
      </table>
    <!-- 翻页开始 -->  
     <%@ include file="../include/jsp/cpage.jsp"%>
       <!-- 翻页结束 -->  
      </td>
  </tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ include file="../include/jsp/footer.jsp"%>
